<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@page import="model.JsfClient"%>
<%@page import="model.JsfCoach"%>
<%@page import="model.JsfStaff"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>在线课程</title>
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
	<%
	JsfClient jsfclient = (JsfClient) session.getAttribute("client");
	JsfCoach jsfcoach = (JsfCoach) session.getAttribute("coach");
	JsfStaff jsfstaff = (JsfStaff) session.getAttribute("staff");
	int ps = 2;
	int ps2 = 2;
	int ps3 = 2;
	if(jsfclient != null )
		ps = jsfclient.getStatus();
	if(jsfcoach != null)
		ps2 = jsfcoach.getStatus();
	if(jsfstaff != null)
		ps3 = jsfstaff.getStatus();
	%>
<body>
	<table>
		<tr>
			<td width="150">编号</td>
			<td width="150">姓名</td>
			<%if( ps == 1 || ps2 == 1){%>
			<td>操作</td>
			<%  }%>
		</tr>
		<s:iterator value="classlist" var="var">
			<tr>
				<td width="150"><a
					href="class_findById?classId=<s:property value="#var.id" />"> <s:property
							value="#var.id" /> </a></td>
				<td ><s:property value="#var.name" /></td>
				<%if( ps == 1 ){%>
				<td>
				<input type="button" value="预定" class="btn btn-info"
				onclick="if(confirm('确定预定？'))location.href ='class_booking?classId=<s:property value="#var.id"/>';" />
				<%  }else %>  
					<%if( ps2 == 1 ){%>
				<td>
				<input type="button" value="查看该班学生信息" class="btn btn-info"
				onclick="location.href ='client_findByClass?classId=<s:property value="#var.id"/>';" />
				<input type="button" value="学生意见" class="btn btn-info"
				onclick="location.href ='order_findByClass?classId=<s:property value="#var.id"/>';" />
				<%  }else %>  
				<%if( ps3 == 1 ){%>
				<td>
				<input type="button" value="查看该班学生信息" class="btn btn-info"
				onclick="location.href ='client_findByClass?classId=<s:property value="#var.id"/>';" />
				<input type="button" value="学生意见" class="btn btn-info"
				onclick="location.href ='order_findByClass?classId=<s:property value="#var.id"/>';" />
				<%  }%>  
			</tr>
		</s:iterator>
	</table>
</body>
</body>
</html>